﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StateGrid.MDBservice;

namespace StateGrid.WWQK
{
    /// <summary>
    /// 外文期刊：篇名表
    /// </summary>
    public class WWQK_PM : PM
    {
        /// <summary>
        /// 索引编码
        /// </summary>
        public String sybm
        {
            get;
            set;
        }
        /// <summary>
        /// 文件名
        /// </summary>
        public String wjm
        {
            get;
            set;
        }
        /// <summary>
        /// 原文件名
        /// </summary>
        public String ywjm
        {
            get;
            set;
        }
        /// <summary>
        /// 年份
        /// </summary>
        public String nf
        {
            get;
            set;
        }
        /// <summary>
        /// 期号
        /// </summary>
        public String qh
        {
            get;
            set;
        }
        /// <summary>
        /// 中文篇名
        /// </summary>
        public String zwpm
        {
            get;
            set;
        }
        /// <summary>
        /// 外文篇名
        /// </summary>
        public String wwpm
        {
            get;
            set;
        }
        /// <summary>
        /// 作者
        /// </summary>
        public String zz
        {
            get;
            set;
        }
        /// <summary>
        /// 作者单位
        /// </summary>
        public String zzdw
        {
            get;
            set;
        }
        /// <summary>
        /// 开本
        /// </summary>
        public String kb
        {
            get;
            set;
        }
        /// <summary>
        /// 页数
        /// </summary>
//        public int ys
//        {
//            get;
//            set;
//        }
        /// <summary>
        /// 中文文摘
        /// </summary>
        public String zwwz
        {
            get;
            set;
        }
        /// <summary>
        /// 外文文摘
        /// </summary>
        public String wwwz
        {
            get;
            set;
        }
        /// <summary>
        /// 中文主题词
        /// </summary>
        public String zwztc
        {
            get;
            set;
        }
        /// <summary>
        /// 外文主题词
        /// </summary>
        public String wwztc
        {
            get;
            set;
        }
        /// <summary>
        /// 国图分类
        /// </summary>
        public String gtfl
        {
            get;
            set;
        }
        /// <summary>
        /// 文献标识
        /// </summary>
        public String wxbs
        {
            get;
            set;
        }
        /// <summary>
        /// 登陆人
        /// </summary>
        public String dlr
        {
            get;
            set;
        }
        /// <summary>
        /// 更新日期
        /// </summary>
        public DateTime gxrq
        {
            get;
            set;
        }
        public override string ToString()
        {
            String ret;
            ret = "[索引编码]" + this.sybm + "[年份]" + this.nf + "[期号]" + this.qh + " [外文篇名]" + this.wwpm;
            return ret;
        }

        public override string AllContent()
        {
            String ret = "('" + sybm + "','" + wjm + "','" + ywjm + "','" + nf + "','" + qh + "','" + zwpm + "','" + wwpm + "','" + zz + "','" + zzdw + "','" + kb + "','" + ys + "','" + zwwz + "','" + zwztc + "','" + wwwz + "','" + wwztc + "','" + gtfl + "','" + wxbs + "','" + dlr + "','" + gxrq + "')";
            return ret;
        }

        public override void fillEmptyStringAsNull()
        {
            String temp = "NULL";
            if (String.Empty.Equals(this.sybm)) sybm = temp;
            if (String.Empty.Equals(this.wjm)) wjm = temp;
            if (String.Empty.Equals(this.ywjm)) ywjm = temp;
            if (String.Empty.Equals(this.nf)) nf = temp;
            if (String.Empty.Equals(this.qh)) qh = "NU";
            if (String.Empty.Equals(this.zwpm)) zwpm = temp;
            if (String.Empty.Equals(this.wwpm)) wwpm = temp;
            if (String.Empty.Equals(this.zz)) zz = temp;
            if (String.Empty.Equals(this.zzdw)) zzdw = temp;
            if (String.Empty.Equals(this.kb)) kb = temp;
            //跳过整型 “页数”
            if (String.Empty.Equals(this.zwwz)) zwwz = temp;
            if (String.Empty.Equals(this.wwwz)) wwwz = temp;
            if (String.Empty.Equals(this.zwztc)) zwztc = temp;
            if (String.Empty.Equals(this.wwztc)) wwztc = temp;
            if (String.Empty.Equals(this.gtfl)) gtfl = temp;
            if (String.Empty.Equals(this.wxbs)) wxbs = temp;
            if (String.Empty.Equals(this.dlr)) dlr = temp;
            //跳过DataTime型 "更新日期"
        }

        public override void eraseNullInEmptyString()
        {
            String temp = "NULL";
            if (temp.Equals(this.sybm)) sybm = String.Empty;
            if (temp.Equals(this.wjm)) wjm = String.Empty;
            if (temp.Equals(this.ywjm)) ywjm = String.Empty;
            if (temp.Equals(this.nf)) nf = String.Empty;
            if ("NU".Equals(this.qh)) qh = String.Empty;
            if (temp.Equals(this.zwpm)) zwpm = String.Empty;
            if (temp.Equals(this.wwpm)) wwpm = String.Empty;
            if (temp.Equals(this.zz)) zz = String.Empty;
            if (temp.Equals(this.zzdw)) zzdw = String.Empty;
            if (temp.Equals(this.kb)) kb = String.Empty;
            //跳过整型 “页数”
            if (temp.Equals(this.zwwz)) zwwz = String.Empty;
            if (temp.Equals(this.wwwz)) wwwz = String.Empty;
            if (temp.Equals(this.zwztc)) zwztc = String.Empty;
            if (temp.Equals(this.wwztc)) wwztc = String.Empty;
            if (temp.Equals(this.gtfl)) gtfl = String.Empty;
            if (temp.Equals(this.wxbs)) wxbs = String.Empty;
            if (temp.Equals(this.dlr)) dlr = String.Empty;
            //跳过DataTime型 "更新日期"
        }
        public String outputString4Test()
        {
            String output = sybm + " " + wjm + " " + zwpm;
            return output;
        }

    }
}
